import {request} from "../request.js"
import {requestUpload} from "../uploadImgFile.js"
import api from "../api.js"


// 开通钱包
export function createWalletAccountInfo(data){
  return request(api.createWalletAccountInfo,"POST",data)
}
// 获取钱包信息
export function getWalletsInfo(data){
  return request(api.walletsInfo,"GET",data)
}
// 获取实名状态
export function getRealNameState(data){
  return request(api.realNameState,"GET",data)
}
// 实名 认证
export function toActiveReal(data){
  return request(api.activeReal,"POST",data)
}
//识别身份证
export function identificationCard(data){
  return requestUpload(api.identificationCardUrl,"POST",data,true)
}
//提现
export function toWithdrawal(data){
  return request(api.withdrawalurl,"POST",data)
}
//获取银行卡 列表
export function getBankList(data){
  return request(api.getBankListUrl,"GET",data)
}
//获取银行类型
export function getBankType(data){
  return request(api.getBankTypeUrl,"GET",data)
}
// 设置默认 银行卡
export function setDefaltBank(data){
  return request(api.defaltBankUrl+"?bankCardId="+data.bankCardId,"POST")
}
// 操作银行 的短信验证码
export function getPhoneCode(data){
  return request(api.codeValidateUrl+"?phone="+data.phone,"GET",data)
}
//解除绑定银行
export function cancelBankCar(data){
  return request(api.cancelBankCardUrl,"POST",data)
}
//绑定银行
export function bindBankCard(data){
  return request(api.bindBankCardUrl,"POST",data)
}
// 修改银行卡
export function updateBankCard(data){
  return request(api.updateBankCardUrl,"POST",data)
}
// 获取提现记录
export function getWithdrawalRecord(data){
  return request(api.withdrawalRecordUrl+"?pageNum="+data.pageNum+"&pageSize="+data.pageSize ,"GET",data)
}
// 获取实名认证信息
export function getRealnameInfo(data){
  return request(api.realnameUrl,"GET",data)
}
